Refactor image tree for API usage#5093
Refactor image tree for API usage#5093openshift-merge-robot merged 1 commit intocontainers:masterfrom
Conversation
|
@baude PTAL |
|
Linter isn't happy yet. Will review now 👍 |
vrothberg
left a comment
There was a problem hiding this comment.
Looking really good, thanks @saschagrunert!
Can you also extend the swagger docs for the image endpoint? -> https://github.com/containers/libpod/blob/master/pkg/api/server/register_images.go#L581
The syntax is a bit clumsy but copy-pasting from the surrounding endpoints could help.
Thanks! Please keep in mind that the varlink API does not work yet :) |
beb8528 to
05471cd
Compare
05471cd to
0f5a902
Compare
|
Varlink API works now, ready for review. |
Still open. |
497ae0c to
3eda7ef
Compare
|
@saschagrunert, can you rebase? This will make local tests easier as we'd fetch |
3eda7ef to
5342cad
Compare
Rebased on top of the latest master branch and addressed your review comments. |
5342cad to
5faeb8b
Compare
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
5faeb8b to
93358ef
Compare
|
Docs seem to be green now as well :) |
|
it LGTM but i want @mheon to peek at this one |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mheon, saschagrunert The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
| @@ -0,0 +1,138 @@ | |||
| package image | |||
There was a problem hiding this comment.
Can we move this to somewhere in pkg/? It doesn't seem much like an API call, given it only returns a string.
There was a problem hiding this comment.
I suggest to wait for @mtrmac's new package. We may be able to integrate it there.
There was a problem hiding this comment.
By "wait" I mean we could merge it as is now and let Miloslav pick it up in his new package.
There was a problem hiding this comment.
Hm. It's just libpod/image, not libpod itself, so sure
There was a problem hiding this comment.
Definitely don’t wait for me, I’m still mostly in learning phase, and I can adjust for whatever happens here.
(Jumping into what I’m sure was a well-considered decision, I’d instinctively prefer to primarily have a well-typed API that returns the structure, and keep the text formatter in the CLI (allowing, at least in principle, a nice GUI to be built on top, for example). OTOH, I guess that exposing the complete tree structure over Varlink/whatever would be a lot of work and pain — and for no benefit at least now that the only consumer is the CLI.)
There was a problem hiding this comment.
That's my big hold-up as well - I'd love to return a data structure that represents the tree, with a .String() that returns the output. I'm willing to defer that to followup work, though.
There was a problem hiding this comment.
(Honestly, though, I'd be fine keeping the tree local-only, and exposing only a literal output string over the API. There's precedence for this with things like podman top)
There was a problem hiding this comment.
(Or was it podman stats... I forget which)
|
LGTM |
Refers to #2791 (comment)